﻿using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Linq;
using static System.Runtime.CompilerServices.RuntimeHelpers;

namespace WinForm_Mes.WorkingManagement.Technological
{
    public partial class AddTechnologicalForm : DevExpress.XtraEditors.XtraForm
    {
        public AddTechnologicalForm()
        {
            InitializeComponent();
        }

        private void labelControl2_Click(object sender, EventArgs e)
        {

        }

        private void AddTechnologicalForm_Load(object sender, EventArgs e)
        {

        }

        // ... 其他代码 ...
        private void AddTechnologicalFlowClick(object sender, EventArgs e)
        {
            // 可加校验
            // if (string.IsNullOrWhiteSpace(txtCode.Text)) { MessageBox.Show("工艺编号不能为空"); return; }

            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        public TechnologicalFlowItem GetItem()
        {
            return new TechnologicalFlowItem
            {
                TechnologicalCode = textEdit1.Text.Trim(),
                TechnologicalName = textEdit2.Text.Trim(),
                IsEnabled = (bool)radioGroup1.EditValue,
                TechnologicalDescription = memoEdit1.Text.Trim(),
                Remarks = memoEdit1.Text.Trim()
            };
        }
    }
}